<template>
  <div class="home-container">
    <header>
      {{title}}
    </header>
    <main>
      <router-view></router-view>
    </main>
    <footer>
        <home-tab @change="title = $event"></home-tab>
    </footer>
  </div>
</template>

<script>
// @ is an alias to /src
import HomeTab from "../components/HomeTab";

export default {
  name: "home",
  components: {
    HomeTab,
  },
  data:function(){
    return{
      title:"猫眼电影"
    }
  }
};
</script>

<style lang="scss" scoped>
  .home-container{
    display: flex;
    height: 100%;
    flex-direction: column;
    header,footer{
      flex: 0;
    }
    main{
      flex: 1;
    }
    header{
      height: 0.5rem;
      background: #e54847;
      text-align: center;
      font-size: 0.2rem;
      line-height: 0.5rem;
      color: #ffffff;
    }
  }
</style>

